package lntu.rsb212.gc;

public class Shape {

    public double getArea(double r) {
        double S;
        S =Math.PI * r * r;
        return S;

    }
    public double getArea(double x,double y) {
        double S;
        S = x * y;
        return S;

    }
    //方法 getPerimeter()-->圆的周长
    public double getPerimeter(double r){
        double C;
        C = 2 * Math.PI * r;
        return C;
    }
    public double getPerimeter(double x,double y){
        double C;
        C = 2*(x+y);
        return C;
    }


}
